package com.hnyfkj.jyindustry.biz.area.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.hnyfkj.jyindustry.biz.area.dto.AreaReturnDto;
import com.hnyfkj.jyindustry.biz.area.service.AreaService;
import com.hnyfkj.jyindustry.common.dto.RespDto;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @ClassName: AreaController
 * @Description: 地区查询
 * @author zhujq
 * @date 2021年3月6日 下午12:41:22 
 */
@RestController
@RequestMapping("/area")
@Api(tags = { "地区信息" })
public class AreaController {
	
	@Autowired
	private AreaService areaService;
	
	/**
	 * 获取区域信息列表
	 * @param areaId
	 * @return
	 */
	@ApiOperation(value = "获取区域信息列表", produces = "application/x-www-form-urlencoded")
	@PostMapping("/getAreaList")
	public RespDto<List<AreaReturnDto>> getAreaList(@RequestParam("upAreaId") final String upAreaId) {
		List<AreaReturnDto> list = areaService.getAreaList(upAreaId);
		return RespDto.succResult(list);
	}
}
